/**
 * jims
 */
package com.jims.master.modules.csm.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jims.master.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.beans.Transient;
import java.util.Date;

/**
 * 消耗品出库明细Entity
 * @author fengyg
 * @version 2017-03-16
 */
public class ExpExportDetail extends DataEntity<ExpExportDetail> {

    private static final long serialVersionUID = 1L;
    private String masterId;		// 出库主表ID
    private String itemNo;		// 序号
    private String infoId;		// exp_info表ID
    private String expCode;		// 消耗品编码
    private String packageNum;		// 包装数量
    private String packageSpec;		// 包装规格
    private String packageUnits;		// 包装单位
    private String minSpec;		// 最小规格
    private String minUnits;		// 最小单位
    private String batchNo;		// 批号
    private Date expireDate;		// 有效期
    private String sterilizationMethod;  //灭菌方式
    private String sterilizationBatchNo;  //灭菌批号
    private Date sterilizationDate;  //灭菌日期
    private Double purchasePrice;		// 出库价
    private String discount;		// 折扣
    private Double quantity;		// 出库数量(小包装)
    private Double inventory;		// 出库后库存数(小包装)
    private String importMasterId;		// 对应的入库主表ID
    private ExpPrice expPrice;     //消耗品价格
    private ExpStock expStock;    //消耗品库存
    private ExpInfo expInfo;      //消耗品信息
    private ExpStorageDept expStorageDept;  //库存单位
    private ExpInoutClass expInoutClass;    //出库类别
    private ExpExportMaster expExportMaster;  //出库主表
    private  String expName; //消耗品名称
    private ExpSupplierCata expSupplierCata;  //供应商

    //    扩展
    private String tradePrice; //进货价
    private String retailPrice;//零售价
    private String exportClass;//出库类别
    private String receiver;//发往
    private Date exportDate;//出库日期
    private String documentNo;//出库单号
    private String storageName;//发货单位
    private int index;//序号
    private Date startDate;
    private Date stopDate;
    private int num;//品种数量
    private String storageId;
    @Transient
    public String getStorageId() {
        return storageId;
    }
    @Transient
    public void setStorageId(String storageId) {
        this.storageId = storageId;
    }

    private String firmId;  //生产厂家
    @Transient
    public int getNum() {
        return num;
    }
    @Transient
    public void setNum(int num) {
        this.num = num;
    }
    @Transient
    public Date getStopDate() {
        return stopDate;
    }
    @Transient
    public void setStopDate(Date stopDate) {
        this.stopDate = stopDate;
    }

    @Transient
    public String getTradePrice() {
        return tradePrice;
    }
    @Transient
    public void setTradePrice(String tradePrice) {
        this.tradePrice = tradePrice;
    }
    @Transient
    public String getRetailPrice() {
        return retailPrice;
    }
    @Transient
    public void setRetailPrice(String retailPrice) {
        this.retailPrice = retailPrice;
    }
    @Transient
    public String getExportClass() {
        return exportClass;
    }
    @Transient
    public void setExportClass(String exportClass) {
        this.exportClass = exportClass;
    }
    @Transient
    public String getReceiver() {
        return receiver;
    }
    @Transient
    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }
    @Transient
    public Date getExportDate() {
        return exportDate;
    }
    @Transient
    public void setExportDate(Date exportDate) {
        this.exportDate = exportDate;
    }
    @Transient
    public String getDocumentNo() {
        return documentNo;
    }
    @Transient
    public void setDocumentNo(String documentNo) {
        this.documentNo = documentNo;
    }
    @Transient
    public String getStorageName() {
        return storageName;
    }
    @Transient
    public void setStorageName(String storageName) {
        this.storageName = storageName;
    }
    @Transient
    public int getIndex() {
        return index;
    }
    @Transient
    public void setIndex(int index) {
        this.index = index;
    }

    @Transient
    public String getExpName() {
        return expName;
    }
    @Transient
    public void setExpName(String expName) {
        this.expName = expName;
    }

    public ExpNameDict getExpNameDict() {
        return expNameDict;
    }

    public void setExpNameDict(ExpNameDict expNameDict) {
        this.expNameDict = expNameDict;
    }

    private ExpNameDict expNameDict;

    public ExpExportDetail() {
        super();
    }

    public ExpExportDetail(String id){
        super(id);
    }

    @Length(min=1, max=64, message="出库主表ID长度必须介于 1 和 64 之间")
    public String getMasterId() {
        return masterId;
    }

    public void setMasterId(String masterId) {
        this.masterId = masterId;
    }

    @Length(min=0, max=4, message="序号长度必须介于 0 和 4 之间")
    public String getItemNo() {
        return itemNo;
    }

    public void setItemNo(String itemNo) {
        this.itemNo = itemNo;
    }

    @Length(min=1, max=64, message="exp_info表ID长度必须介于 1 和 64 之间")
    public String getInfoId() {
        return infoId;
    }

    public void setInfoId(String infoId) {
        this.infoId = infoId;
    }

    @Length(min=1, max=32, message="消耗品编码长度必须介于 1 和 32 之间")
    public String getExpCode() {
        return expCode;
    }

    public void setExpCode(String expCode) {
        this.expCode = expCode;
    }

    @Length(min=0, max=8, message="包装数量长度必须介于 0 和 8 之间")
    public String getPackageNum() {
        return packageNum;
    }

    public void setPackageNum(String packageNum) {
        this.packageNum = packageNum;
    }

    @Length(min=1, max=20, message="包装规格长度必须介于 1 和 20 之间")
    public String getPackageSpec() {
        return packageSpec;
    }

    public void setPackageSpec(String packageSpec) {
        this.packageSpec = packageSpec;
    }

    @Length(min=1, max=2, message="包装单位长度必须介于 1 和 2 之间")
    public String getPackageUnits() {
        return packageUnits;
    }

    public void setPackageUnits(String packageUnits) {
        this.packageUnits = packageUnits;
    }

    @Length(min=1, max=20, message="最小规格长度必须介于 1 和 20 之间")
    public String getMinSpec() {
        return minSpec;
    }

    public void setMinSpec(String minSpec) {
        this.minSpec = minSpec;
    }

    @Length(min=1, max=2, message="最小单位长度必须介于 1 和 2 之间")
    public String getMinUnits() {
        return minUnits;
    }

    public void setMinUnits(String minUnits) {
        this.minUnits = minUnits;
    }

    @Length(min=1, max=64, message="批号长度必须介于 1 和 64 之间")
    public String getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message="有效期不能为空")
    public Date getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Date expireDate) {
        this.expireDate = expireDate;
    }

    public Double getPurchasePrice() {
        return purchasePrice;
    }

    public void setPurchasePrice(Double purchasePrice) {
        this.purchasePrice = purchasePrice;
    }

    public String getDiscount() {
        return discount;
    }

    public void setDiscount(String discount) {
        this.discount = discount;
    }

    public Double getQuantity() {
        return quantity;
    }

    public void setQuantity(Double quantity) {
        this.quantity = quantity;
    }

    public Double getInventory() {
        return inventory;
    }

    public void setInventory(Double inventory) {
        this.inventory = inventory;
    }
    @Transient
    public Date getStartDate() {
        return startDate;
    }
    @Transient
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }
    @Length(min=0, max=64, message="对应的入库主表ID长度必须介于 0 和 64 之间")
    public String getImportMasterId() {
        return importMasterId;
    }

    public void setImportMasterId(String importMasterId) {
        this.importMasterId = importMasterId;
    }

    public ExpPrice getExpPrice() {
        return expPrice;
    }

    public void setExpPrice(ExpPrice expPrice) {
        this.expPrice = expPrice;
    }

    public ExpStock getExpStock() {
        return expStock;
    }

    public void setExpStock(ExpStock expStock) {
        this.expStock = expStock;
    }

    public ExpInfo getExpInfo() {
        return expInfo;
    }

    public void setExpInfo(ExpInfo expInfo) {
        this.expInfo = expInfo;
    }

    public ExpStorageDept getExpStorageDept() {
        return expStorageDept;
    }

    public void setExpStorageDept(ExpStorageDept expStorageDept) {
        this.expStorageDept = expStorageDept;
    }

    public ExpInoutClass getExpInoutClass() {
        return expInoutClass;
    }

    public void setExpInoutClass(ExpInoutClass expInoutClass) {
        this.expInoutClass = expInoutClass;
    }

    public ExpExportMaster getExpExportMaster() {
        return expExportMaster;
    }

    public void setExpExportMaster(ExpExportMaster expExportMaster) {
        this.expExportMaster = expExportMaster;
    }

    public ExpSupplierCata getExpSupplierCata() {
        return expSupplierCata;
    }

    public void setExpSupplierCata(ExpSupplierCata expSupplierCata) {
        this.expSupplierCata = expSupplierCata;
    }

    public String getSterilizationMethod() {
        return sterilizationMethod;
    }

    public void setSterilizationMethod(String sterilizationMethod) {
        this.sterilizationMethod = sterilizationMethod;
    }

    public String getSterilizationBatchNo() {
        return sterilizationBatchNo;
    }

    public void setSterilizationBatchNo(String sterilizationBatchNo) {
        this.sterilizationBatchNo = sterilizationBatchNo;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getSterilizationDate() {
        return sterilizationDate;
    }

    public void setSterilizationDate(Date sterilizationDate) {
        this.sterilizationDate = sterilizationDate;
    }

    public String getFirmId() {
        return firmId;
    }

    public void setFirmId(String firmId) {
        this.firmId = firmId;
    }
}